test(eval): recognize real Discharge Planning docs in golden alias#206
Merged
Conversation
… alias The golden fixtures reference synthetic MHSP.* filenames that were superseded when the corpus was repopulated with real named documents. Most alias-match, but the Discharge alias listed only "…to Discharge" mental-health variants, not the "Discharge Planning for Community Patients / Inpatients" documents that actually rank for the admission-vs-discharge comparison. That made admission-discharge-comparison report a false top-5 recall miss on the non-existent MHSP.Discharge.pdf even though a real, relevant discharge document was retrieved. Add "Discharge Planning" to the Discharge alias. Any "Discharge Planning …" document is unambiguously a discharge document, so this recognizes a genuine hit rather than masking a miss. admission-discharge-comparison now passes (grounded, 5 citations); eval-quality unit tests 11/11. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Smallest safe fix for the
admission-discharge-comparisongolden failure (item #2 from triage).Root cause
The golden fixtures reference synthetic
MHSP.*filenames that no longer exist — the corpus was repopulated with real named documents. TheclinicalDocumentAliaseslayer maps the old names to real ones, but theDischargealias listed only "…to Discharge" mental-health variants, not the "Discharge Planning for Community Patients / Inpatients" documents that actually rank for this query. So the case reported a false top-5 recall miss on the non-existentMHSP.Discharge.pdf, even though a real, relevant discharge document ("Discharge Planning for Community Patients (NMHS).pdf") was retrieved and the answer was grounded.Fix
Add
"Discharge Planning"to theDischargealias. Any "Discharge Planning …" document is unambiguously a discharge document, so this recognizes a genuine hit rather than masking a miss (the concern I flagged during triage).Verification
admission-discharge-comparisonnow passes: grounded, 5 citations, no failures.tests/eval-quality.test.ts11/11; typecheck/lint/prettier clean.Not included (deliberately): the NOCC and agitation-table failures are a separate, deeper issue — the deterministic document-list / table answers are mangled by the clinical-prose sanitizer (
sanitizeStructuredText) they shouldn't run through. That has no small safe fix (the sanitizer is shared and load-bearing for real LLM prose), so it's left as a scoped follow-up rather than risking regressions.🤖 Generated with Claude Code